
local count=0
local delayInSeconds =3

local heartbeatCheck =nil

heartbeatCheck=function (args)
    count=count+1
    ngx.log(ngx.ERR,'do check',count)
    local ok,err = ngx.timer.at(delayInSeconds,hearbeatCheck)
    if not ok then 
 	ngx.log(ngx.ERR,"faild to startup heartbeat worker...",err)
    end 
end 

heartbeatCheck()



